#@adminLayout() #define main()

<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="config-form">
                <div class="select-list">
                    <ul>
                        <li>
                            	登录账号：<input type="text" name="login_name"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<script type="text/javascript">
    var prefix ="#(ctx)/sys_user_online";

    $(function() {
    	
        var options = {
            url: prefix + "/list",
            uniqueId: "sessionid",
            sortName: "last_access_time",
            sortOrder: "asc",
            modalName: "在线用户",
            columns: [
                {
	                title: '操作',
	                align: 'center',
	                formatter: function(value, row, index) {
	                    var actions = [];
	                    actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="unline(\'' + row.sessionid + '\',\'' + row.login_name + '\')"><i class="fa fa-remove"></i>下线</a>');
	                    return actions.join('');
	                }
	            },
                {
                    field: 'login_name',
                    title: '登录账号'
                },
                {
                    field: 'start_time',
                    title: '登录时间'
                },
                {
                    field: 'last_access_time',
                    title: '最后更新时间'
                },
                {
                    field: 'ipaddr',
                    title: '登录IP'
                },
                {
                    field: 'os',
                    title: '操作系统'
                },
                {
                    field: 'browser',
                    title: '浏览器'
                },
                {
                    field: 'sessionid',
                    title: 'sessionid'
                }]
        };
        $.table.init(options);
    });
    
    function unline(sessionid,login_name)
    {
    	
    }
</script>
</body>
#end